(0) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
power(x', S(x)) → mult(x', power(x', x))
mult(x', S(x)) → add0(x', mult(x', x))
add0(x', S(x)) → +(S(0), add0(x', x))
power(x, 0) → S(0)
mult(x, 0) → 0
add0(x, 0) → x
The (relative) TRS S consists of the following rules:
+(x, S(0)) → S(x)
+(S(0), y) → S(y)
Rewrite Strategy: INNERMOST
(1) DecreasingLoopProof (EQUIVALENT transformation)
The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
power(x', S(x)) →+ mult(x', power(x', x))
gives rise to a decreasing loop by considering the right hand sides subterm at position [1].
The pumping substitution is [x / S(x)].
The result substitution is [ ].
(2) BOUNDS(n^1, INF)
(3) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
power(x', S(x)) → mult(x', power(x', x))
mult(x', S(x)) → add0(x', mult(x', x))
add0(x', S(x)) → +'(S(0'), add0(x', x))
power(x, 0') → S(0')
mult(x, 0') → 0'
add0(x, 0') → x
The (relative) TRS S consists of the following rules:
+'(x, S(0')) → S(x)
+'(S(0'), y) → S(y)
Rewrite Strategy: INNERMOST
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
Innermost TRS:
Rules:
power(x', S(x)) → mult(x', power(x', x))
mult(x', S(x)) → add0(x', mult(x', x))
add0(x', S(x)) → +'(S(0'), add0(x', x))
power(x, 0') → S(0')
mult(x, 0') → 0'
add0(x, 0') → x
+'(x, S(0')) → S(x)
+'(S(0'), y) → S(y)
Types:
power :: S:0' → S:0' → S:0'
S :: S:0' → S:0'
mult :: S:0' → S:0' → S:0'
add0 :: S:0' → S:0' → S:0'
+' :: S:0' → S:0' → S:0'
0' :: S:0'
hole_S:0'1_1 :: S:0'
gen_S:0'2_1 :: Nat → S:0'
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
power,
mult,
add0They will be analysed ascendingly in the following order:
mult < power
add0 < mult
(8) Obligation:
Innermost TRS:
Rules:
power(
x',
S(
x)) →
mult(
x',
power(
x',
x))
mult(
x',
S(
x)) →
add0(
x',
mult(
x',
x))
add0(
x',
S(
x)) →
+'(
S(
0'),
add0(
x',
x))
power(
x,
0') →
S(
0')
mult(
x,
0') →
0'add0(
x,
0') →
x+'(
x,
S(
0')) →
S(
x)
+'(
S(
0'),
y) →
S(
y)
Types:
power :: S:0' → S:0' → S:0'
S :: S:0' → S:0'
mult :: S:0' → S:0' → S:0'
add0 :: S:0' → S:0' → S:0'
+' :: S:0' → S:0' → S:0'
0' :: S:0'
hole_S:0'1_1 :: S:0'
gen_S:0'2_1 :: Nat → S:0'
Generator Equations:
gen_S:0'2_1(0) ⇔ 0'
gen_S:0'2_1(+(x, 1)) ⇔ S(gen_S:0'2_1(x))
The following defined symbols remain to be analysed:
add0, power, mult
They will be analysed ascendingly in the following order:
mult < power
add0 < mult
(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
add0(
gen_S:0'2_1(
1),
gen_S:0'2_1(
n4_1)) →
gen_S:0'2_1(
+(
1,
n4_1)), rt ∈ Ω(1 + n4
1)
Induction Base:
add0(gen_S:0'2_1(1), gen_S:0'2_1(0)) →RΩ(1)
gen_S:0'2_1(1)
Induction Step:
add0(gen_S:0'2_1(1), gen_S:0'2_1(+(n4_1, 1))) →RΩ(1)
+'(S(0'), add0(gen_S:0'2_1(1), gen_S:0'2_1(n4_1))) →IH
+'(S(0'), gen_S:0'2_1(+(1, c5_1))) →RΩ(0)
S(gen_S:0'2_1(+(1, n4_1)))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(10) Complex Obligation (BEST)
(11) Obligation:
Innermost TRS:
Rules:
power(
x',
S(
x)) →
mult(
x',
power(
x',
x))
mult(
x',
S(
x)) →
add0(
x',
mult(
x',
x))
add0(
x',
S(
x)) →
+'(
S(
0'),
add0(
x',
x))
power(
x,
0') →
S(
0')
mult(
x,
0') →
0'add0(
x,
0') →
x+'(
x,
S(
0')) →
S(
x)
+'(
S(
0'),
y) →
S(
y)
Types:
power :: S:0' → S:0' → S:0'
S :: S:0' → S:0'
mult :: S:0' → S:0' → S:0'
add0 :: S:0' → S:0' → S:0'
+' :: S:0' → S:0' → S:0'
0' :: S:0'
hole_S:0'1_1 :: S:0'
gen_S:0'2_1 :: Nat → S:0'
Lemmas:
add0(gen_S:0'2_1(1), gen_S:0'2_1(n4_1)) → gen_S:0'2_1(+(1, n4_1)), rt ∈ Ω(1 + n41)
Generator Equations:
gen_S:0'2_1(0) ⇔ 0'
gen_S:0'2_1(+(x, 1)) ⇔ S(gen_S:0'2_1(x))
The following defined symbols remain to be analysed:
mult, power
They will be analysed ascendingly in the following order:
mult < power
(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
mult(
gen_S:0'2_1(
1),
gen_S:0'2_1(
n487_1)) →
gen_S:0'2_1(
n487_1), rt ∈ Ω(1 + n487
1 + n487
12)
Induction Base:
mult(gen_S:0'2_1(1), gen_S:0'2_1(0)) →RΩ(1)
0'
Induction Step:
mult(gen_S:0'2_1(1), gen_S:0'2_1(+(n487_1, 1))) →RΩ(1)
add0(gen_S:0'2_1(1), mult(gen_S:0'2_1(1), gen_S:0'2_1(n487_1))) →IH
add0(gen_S:0'2_1(1), gen_S:0'2_1(c488_1)) →LΩ(1 + n4871)
gen_S:0'2_1(+(1, n487_1))
We have rt ∈ Ω(n2) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n2).
(13) Complex Obligation (BEST)
(14) Obligation:
Innermost TRS:
Rules:
power(
x',
S(
x)) →
mult(
x',
power(
x',
x))
mult(
x',
S(
x)) →
add0(
x',
mult(
x',
x))
add0(
x',
S(
x)) →
+'(
S(
0'),
add0(
x',
x))
power(
x,
0') →
S(
0')
mult(
x,
0') →
0'add0(
x,
0') →
x+'(
x,
S(
0')) →
S(
x)
+'(
S(
0'),
y) →
S(
y)
Types:
power :: S:0' → S:0' → S:0'
S :: S:0' → S:0'
mult :: S:0' → S:0' → S:0'
add0 :: S:0' → S:0' → S:0'
+' :: S:0' → S:0' → S:0'
0' :: S:0'
hole_S:0'1_1 :: S:0'
gen_S:0'2_1 :: Nat → S:0'
Lemmas:
add0(gen_S:0'2_1(1), gen_S:0'2_1(n4_1)) → gen_S:0'2_1(+(1, n4_1)), rt ∈ Ω(1 + n41)
mult(gen_S:0'2_1(1), gen_S:0'2_1(n487_1)) → gen_S:0'2_1(n487_1), rt ∈ Ω(1 + n4871 + n48712)
Generator Equations:
gen_S:0'2_1(0) ⇔ 0'
gen_S:0'2_1(+(x, 1)) ⇔ S(gen_S:0'2_1(x))
The following defined symbols remain to be analysed:
power
(15) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
power(
gen_S:0'2_1(
1),
gen_S:0'2_1(
n780_1)) →
gen_S:0'2_1(
1), rt ∈ Ω(1 + n780
1)
Induction Base:
power(gen_S:0'2_1(1), gen_S:0'2_1(0)) →RΩ(1)
S(0')
Induction Step:
power(gen_S:0'2_1(1), gen_S:0'2_1(+(n780_1, 1))) →RΩ(1)
mult(gen_S:0'2_1(1), power(gen_S:0'2_1(1), gen_S:0'2_1(n780_1))) →IH
mult(gen_S:0'2_1(1), gen_S:0'2_1(1)) →LΩ(3)
gen_S:0'2_1(1)
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(16) Complex Obligation (BEST)
(17) Obligation:
Innermost TRS:
Rules:
power(
x',
S(
x)) →
mult(
x',
power(
x',
x))
mult(
x',
S(
x)) →
add0(
x',
mult(
x',
x))
add0(
x',
S(
x)) →
+'(
S(
0'),
add0(
x',
x))
power(
x,
0') →
S(
0')
mult(
x,
0') →
0'add0(
x,
0') →
x+'(
x,
S(
0')) →
S(
x)
+'(
S(
0'),
y) →
S(
y)
Types:
power :: S:0' → S:0' → S:0'
S :: S:0' → S:0'
mult :: S:0' → S:0' → S:0'
add0 :: S:0' → S:0' → S:0'
+' :: S:0' → S:0' → S:0'
0' :: S:0'
hole_S:0'1_1 :: S:0'
gen_S:0'2_1 :: Nat → S:0'
Lemmas:
add0(gen_S:0'2_1(1), gen_S:0'2_1(n4_1)) → gen_S:0'2_1(+(1, n4_1)), rt ∈ Ω(1 + n41)
mult(gen_S:0'2_1(1), gen_S:0'2_1(n487_1)) → gen_S:0'2_1(n487_1), rt ∈ Ω(1 + n4871 + n48712)
power(gen_S:0'2_1(1), gen_S:0'2_1(n780_1)) → gen_S:0'2_1(1), rt ∈ Ω(1 + n7801)
Generator Equations:
gen_S:0'2_1(0) ⇔ 0'
gen_S:0'2_1(+(x, 1)) ⇔ S(gen_S:0'2_1(x))
No more defined symbols left to analyse.
(18) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n2) was proven with the following lemma:
mult(gen_S:0'2_1(1), gen_S:0'2_1(n487_1)) → gen_S:0'2_1(n487_1), rt ∈ Ω(1 + n4871 + n48712)
(19) BOUNDS(n^2, INF)
(20) Obligation:
Innermost TRS:
Rules:
power(
x',
S(
x)) →
mult(
x',
power(
x',
x))
mult(
x',
S(
x)) →
add0(
x',
mult(
x',
x))
add0(
x',
S(
x)) →
+'(
S(
0'),
add0(
x',
x))
power(
x,
0') →
S(
0')
mult(
x,
0') →
0'add0(
x,
0') →
x+'(
x,
S(
0')) →
S(
x)
+'(
S(
0'),
y) →
S(
y)
Types:
power :: S:0' → S:0' → S:0'
S :: S:0' → S:0'
mult :: S:0' → S:0' → S:0'
add0 :: S:0' → S:0' → S:0'
+' :: S:0' → S:0' → S:0'
0' :: S:0'
hole_S:0'1_1 :: S:0'
gen_S:0'2_1 :: Nat → S:0'
Lemmas:
add0(gen_S:0'2_1(1), gen_S:0'2_1(n4_1)) → gen_S:0'2_1(+(1, n4_1)), rt ∈ Ω(1 + n41)
mult(gen_S:0'2_1(1), gen_S:0'2_1(n487_1)) → gen_S:0'2_1(n487_1), rt ∈ Ω(1 + n4871 + n48712)
power(gen_S:0'2_1(1), gen_S:0'2_1(n780_1)) → gen_S:0'2_1(1), rt ∈ Ω(1 + n7801)
Generator Equations:
gen_S:0'2_1(0) ⇔ 0'
gen_S:0'2_1(+(x, 1)) ⇔ S(gen_S:0'2_1(x))
No more defined symbols left to analyse.
(21) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n2) was proven with the following lemma:
mult(gen_S:0'2_1(1), gen_S:0'2_1(n487_1)) → gen_S:0'2_1(n487_1), rt ∈ Ω(1 + n4871 + n48712)
(22) BOUNDS(n^2, INF)
(23) Obligation:
Innermost TRS:
Rules:
power(
x',
S(
x)) →
mult(
x',
power(
x',
x))
mult(
x',
S(
x)) →
add0(
x',
mult(
x',
x))
add0(
x',
S(
x)) →
+'(
S(
0'),
add0(
x',
x))
power(
x,
0') →
S(
0')
mult(
x,
0') →
0'add0(
x,
0') →
x+'(
x,
S(
0')) →
S(
x)
+'(
S(
0'),
y) →
S(
y)
Types:
power :: S:0' → S:0' → S:0'
S :: S:0' → S:0'
mult :: S:0' → S:0' → S:0'
add0 :: S:0' → S:0' → S:0'
+' :: S:0' → S:0' → S:0'
0' :: S:0'
hole_S:0'1_1 :: S:0'
gen_S:0'2_1 :: Nat → S:0'
Lemmas:
add0(gen_S:0'2_1(1), gen_S:0'2_1(n4_1)) → gen_S:0'2_1(+(1, n4_1)), rt ∈ Ω(1 + n41)
mult(gen_S:0'2_1(1), gen_S:0'2_1(n487_1)) → gen_S:0'2_1(n487_1), rt ∈ Ω(1 + n4871 + n48712)
Generator Equations:
gen_S:0'2_1(0) ⇔ 0'
gen_S:0'2_1(+(x, 1)) ⇔ S(gen_S:0'2_1(x))
No more defined symbols left to analyse.
(24) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n2) was proven with the following lemma:
mult(gen_S:0'2_1(1), gen_S:0'2_1(n487_1)) → gen_S:0'2_1(n487_1), rt ∈ Ω(1 + n4871 + n48712)
(25) BOUNDS(n^2, INF)
(26) Obligation:
Innermost TRS:
Rules:
power(
x',
S(
x)) →
mult(
x',
power(
x',
x))
mult(
x',
S(
x)) →
add0(
x',
mult(
x',
x))
add0(
x',
S(
x)) →
+'(
S(
0'),
add0(
x',
x))
power(
x,
0') →
S(
0')
mult(
x,
0') →
0'add0(
x,
0') →
x+'(
x,
S(
0')) →
S(
x)
+'(
S(
0'),
y) →
S(
y)
Types:
power :: S:0' → S:0' → S:0'
S :: S:0' → S:0'
mult :: S:0' → S:0' → S:0'
add0 :: S:0' → S:0' → S:0'
+' :: S:0' → S:0' → S:0'
0' :: S:0'
hole_S:0'1_1 :: S:0'
gen_S:0'2_1 :: Nat → S:0'
Lemmas:
add0(gen_S:0'2_1(1), gen_S:0'2_1(n4_1)) → gen_S:0'2_1(+(1, n4_1)), rt ∈ Ω(1 + n41)
Generator Equations:
gen_S:0'2_1(0) ⇔ 0'
gen_S:0'2_1(+(x, 1)) ⇔ S(gen_S:0'2_1(x))
No more defined symbols left to analyse.
(27) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
add0(gen_S:0'2_1(1), gen_S:0'2_1(n4_1)) → gen_S:0'2_1(+(1, n4_1)), rt ∈ Ω(1 + n41)
(28) BOUNDS(n^1, INF)